Unit Personel_BarkodBasma;

Interface

Uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ppCtrls, ppPrnabl, ppClass, ppBarCod, ppBands, ppCache, ppComm,
  ppRelatv, ppProd, ppReport, StdCtrls, DB, ADODB, ppDB, ppDBPipe, Grids,
  Wwdbigrd, Wwdbgrid, Buttons, ExtCtrls;

Type
  TPersonel_BarkodBasmaF = Class(TForm)
    ppReport1: TppReport;
    ppHeaderBand1: TppHeaderBand;
    ppDetailBand1: TppDetailBand;
    ppFooterBand1: TppFooterBand;
    ppDBPipeline1: TppDBPipeline;
    ppDBBarCode1: TppDBBarCode;
    ppDBText1: TppDBText;
    Perkart1: TADOQuery;
    Perkart1S: TDataSource;
    wwDBGrid1: TwwDBGrid;
    ppDBText2: TppDBText;
    Panel1: TPanel;
    Button1: TButton;
    bkapat: TBitBtn;
    Procedure Button1Click(Sender: TObject);
    Procedure FormShow(Sender: TObject);
    Procedure bkapatClick(Sender: TObject);
    Procedure wwDBGrid1KeyPress(Sender: TObject; Var Key: Char);
    Procedure FormClose(Sender: TObject; Var Action: TCloseAction);
  Private
    { Private declarations }
  Public
    { Public declarations }
  End;

Var
  Personel_BarkodBasmaF: TPersonel_BarkodBasmaF;

Implementation
Uses data;

{$R *.dfm}

Procedure TPersonel_BarkodBasmaF.Button1Click(Sender: TObject);
Begin
  Perkart1.DisableControls;
  Perkart1.Filter := 'selected=1';
  Perkart1.Filtered := true;

  ppReport1.Print;
  Perkart1.Filtered := false;
  Perkart1.EnableControls;
End;

Procedure TPersonel_BarkodBasmaF.FormShow(Sender: TObject);
Begin
  YerAyarla(Self, False);

  Perkart1.close;
  Perkart1.open;
End;

Procedure TPersonel_BarkodBasmaF.bkapatClick(Sender: TObject);
Begin
  close;
End;

Procedure TPersonel_BarkodBasmaF.wwDBGrid1KeyPress(Sender: TObject; Var Key:
  Char);
Begin
  Perkart1.Edit;
  Perkart1.FieldByName('selected').Value := 1;
  Perkart1.Post;
End;

Procedure TPersonel_BarkodBasmaF.FormClose(Sender: TObject;
  Var Action: TCloseAction);
Begin
  Action := CaFree;
  Personel_BarkodBasmaF := Nil;
End;

End.
